home *** CD-ROM | disk | FTP | other *** search
- #Inventor V2.1 ascii
-
- DEF BM_Root Separator {
-
- #
- # To be a valid button file, the top level Separator
- # must be called BM_Root. The letter "B" must be
- # the 26th character in the file to be recognized
- # by the filetyping rules (otherwise, the desktop
- # will assume it is an Inventor file.
- #
- # Note that this file cannot be loaded into Inventor
- # because it depends on several highly specialized nodes
- #
-
-
- #
- # The light group contains all lights. Any lights
- # found outside this group will be seen but will not
- # be editable.
- # The group must be named "LightGroup"
- # Placing nodes other than lights into this group
- # will have unpredictable results.
- #
- DEF LightGroup Group {
- DirectionalLight {
- on TRUE
- }
- DirectionalLight {
- on TRUE
- }
- }
-
-
- #
- # The CoTextGraph. Essentially an SoText3 node with some smarts...
- #
- DEF theObject Separator {
- DEF theTextGraph CoTextGraph {
- textType 1
- string "Sample Text"
- fontName "Palatino-Roman;HonMinchoLtBT--H;HonMinchoLtBT--Hankaku"
- fontStyle FontStyle {
- size 18
- style ""
- justify "MIDDLE"
- spacing 1
- }
- }
- }
-
- #
- # The button part of the scene
- #
- Separator {
- #
- # The name given to the CoMultiButton
- # is the title of the button that appears
- # in the Button Shape text field within
- # Button Magic... (in this case "ExampleButton")
- DEF ExampleButton CoMultiButton {
- geometry Separator {
-
- #
- # This transform must exist and be placed
- # here to be recognized by the button-sizing code
- #
- Transform { }
-
- #
- # Below are all of the shapes that the
- # button can take on, sorted in order
- # of increasing aspect ratio (width/height)
- #
- # As the aspect ratio of the required
- # button changes, Button Magic will automatically
- # choose the closest geometry. Hence, the geometry
- # MUST appear under a switch node and MUST be
- # sorted by aspect ratio.
- #
- # Typically, materials should not be put
- # inside this geometry, since they will
- # override those set by button magic.
- # They're used here to show when button magic
- # switches between geometry.
- #
-
- Switch {
- # First geometry... a blue cube, 1.0 aspect
- Separator {
- Material { diffuseColor 0.0 0.0 1.0 }
- Cube { width 1 }
- }
-
- # Second geometry... a red cube, 4.0 aspect
- Separator {
- Material { diffuseColor 1.0 0.0 0.0 }
- Transform { scaleFactor 4.0 1.0 1.0 }
- Cube { width 1 }
- }
-
- # Third geometry... a yello cube, 8.0 aspect
- Separator {
- Material { diffuseColor 1.0 1.0 0.0 }
- Cube { width 8 }
- }
-
- # And so on...
- }
- }
-
- #
- # This must point to the CoTextGraph, wherever it is
- # in the scene graph. The CoMultiButton monitors it
- # for changes so it may configure the above geometry.
- #
- attachTo USE theTextGraph
-
- }
- }
- }
-